//值传递
public class Power {
    //形参列表
    public static double power(double a,int b){
        //a=100;
        //b=1000;
        double tmp=1.0;
        for (int i=1;i<=b;i++)
            tmp*=a;
        return tmp;
    }

    public static void main(String[] args) {
        double a=5.5;
        int b=3;
        power(5.5,3);
        System.out.println("计算a的b次幂");
        System.out.println("结果为："+power(5.5,3));

    }
}
